<template>
  <component :is="componentMap[props.type]" v-bind="attrs" />
</template>

<script lang="ts" setup>
  import { useAttrs } from 'vue';
  import QText from './q-text.vue';
  import QRadio from './q-radio.vue';

  const componentMap = {
    1: QText,
    2: QRadio,
  };
  const attrs = useAttrs();
  const props = defineProps({
    type: {
      type: Number,
      default: 1,
    },
  });
</script>
